<?php
/**
 * Product Admin
 */
?>
<div class="header">
	<div class="add">
		<a href="<?= $this->routeUrl("admin_product_list") ?>">Product List</a> | 
		<a href="<?= $this->routeUrl("admin_product_delete", array("product_id" => $this->product['product_id'])) ?>">Delete Product</a>
		<?php /* | 
		<?php if ($this->product['is_active']): ?>
			<a href="<?= $this->routeUrl("admin_product_deactivate", array("product_id" => $this->product['product_id'])) ?>">Deactivate Product</a>
		<?php else: ?>
			<a href="<?= $this->routeUrl("admin_product_activate", array("product_id" => $this->product['product_id'])) ?>">Activate Product</a>
		<?php endif ?>
		*/ ?>
	</div>
	<div class="clear"></div>
</div>

<div id="productadmin" class="adminbox">
	<?= $this->partial('product/edit.tabs.phtml', array(
		'product' => $this->product,
		'tab' => $this->tab
	)) ?>
	<?php
	/**
	 * I use a switch here so that people can't just pass in arbitrary template names to load
	 * @todo Eventually this needs to come from extensions somehow...
	 */
	switch($this->tab) {
		case "categories":
			echo $this->render('product/edit.categories.phtml');
			break;
		case "images":
			echo $this->render('product/edit.images.phtml');
			break;
		default:
			echo $this->render('product/edit.default.phtml');
			break;
	}
	?>
</div>